package com.jd.ty.pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class CustomerOrder implements Serializable {

	private Long orderId;
	private String orderSerial;
	private Employee employee;
	private Customer customer;
	private Date scheduledDate;
	private Date dealDate;
	private Dictionary status;
	private Dictionary projectType;

	private List<ProjectAttrValue> projectAttrValues = new ArrayList<ProjectAttrValue>();

	public Long getOrderId() {
		return orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public Date getDealDate() {
		return dealDate;
	}

	public void setDealDate(Date dealDate) {
		this.dealDate = dealDate;
	}

	public Dictionary getProjectType() {
		return projectType;
	}

	public void setProjectType(Dictionary projectType) {
		this.projectType = projectType;
	}

	public List<ProjectAttrValue> getProjectAttrValues() {
		return projectAttrValues;
	}

	public void setProjectAttrValues(List<ProjectAttrValue> projectAttrValues) {
		this.projectAttrValues = projectAttrValues;
	}

	public Date getScheduledDate() {
		return scheduledDate;
	}

	public void setScheduledDate(Date scheduledDate) {
		this.scheduledDate = scheduledDate;
	}

	public Dictionary getStatus() {
		return status;
	}

	public void setStatus(Dictionary status) {
		this.status = status;
	}

	public String getOrderSerial() {
		return orderSerial;
	}

	public void setOrderSerial(String orderSerial) {
		this.orderSerial = orderSerial;
	}

	public String getProjectDetail() {
		StringBuilder sb = new StringBuilder();
		for (ProjectAttrValue value : projectAttrValues) {
			if (null != value.getAttrValue()
					&& !("").equals(value.getAttrValue())) {
				sb.append(value.getProjectAttribute().getAttrName() + ":"
						+ value.getAttrValue());
			}
		}
		return sb.toString();
	}
}
